describe('practice-2-10', function () {

    it("求男人、女人和小孩各有几人", function () {
        var arr_result = solve_indefinite_equation();
        expect(arr_result.length).toBe(11);
        for(var i = 0; i < arr_result.length; i ++)
        {
            if(arr_result[i]['man'] === 0)
                expect(arr_result[i]['woman'] === 20&&arr_result[i]['child']===10).toBe(true);
            else if(arr_result[i]['man'] === 1)
                expect(arr_result[i]['woman'] === 18&&arr_result[i]['child']===11).toBe(true);
            else if(arr_result[i]['man'] === 2)
                expect(arr_result[i]['woman'] === 16&&arr_result[i]['child']===12).toBe(true);
            else if(arr_result[i]['man'] === 3)
                expect(arr_result[i]['woman'] === 14&&arr_result[i]['child']===13).toBe(true);
            else if(arr_result[i]['man'] === 4)
                expect(arr_result[i]['woman'] === 12&&arr_result[i]['child']===14).toBe(true);
            else if(arr_result[i]['man'] === 5)
                expect(arr_result[i]['woman'] === 10&&arr_result[i]['child']===15).toBe(true);
            else if(arr_result[i]['man'] === 6)
                expect(arr_result[i]['woman'] === 8&&arr_result[i]['child']===16).toBe(true);
            else if(arr_result[i]['man'] === 7)
                expect(arr_result[i]['woman'] === 6&&arr_result[i]['child']===17).toBe(true);
            else if(arr_result[i]['man'] === 8)
                expect(arr_result[i]['woman'] === 4&&arr_result[i]['child']===18).toBe(true);
            else if(arr_result[i]['man'] === 9)
                expect(arr_result[i]['woman'] === 2&&arr_result[i]['child']===19).toBe(true);
            else if(arr_result[i]['man'] === 10)
                expect(arr_result[i]['woman'] === 0&&arr_result[i]['child']===20).toBe(true);
        }
    });

});